package com.teradata.multithread.chain;

/**
 * @Project: edb
 * @Description:
 * @Version 1.0
 * @Throws :
 * @Author: <li>2019/4/23 lyndon Create 1.0
 * @Copyright (c)2018-2018 中央结算公司，版权所有
 * @Modified By:
 */
public class DemoRunner {

    private PrintProcessor printProcessor;

    public DemoRunner() {
        SaveProcessor saveProcessor = new SaveProcessor();
        saveProcessor.start();
        printProcessor = new PrintProcessor(saveProcessor);
        printProcessor.start();
    }

    public void doTest(){
        Request request = new Request();
        request.setName("huzy");
        printProcessor.processorRequest(request);
    }

    public static void main(String[] args) {
        DemoRunner demoRunner = new DemoRunner();
        demoRunner.doTest();
    }


}
